package com.aspose.cells;

class zbpp extends zbph {
   private int a = 0;
   private double b = 0.0D;
   private double f = 0.0D;
   private boolean g = false;

   public zbpp(boolean var1, boolean var2, boolean var3) {
      super(var2, false, var3);
      this.g = var1;
   }

   protected boolean b() {
      return false;
   }

   protected zagu c() {
      ++this.a;
      return null;
   }

   protected zagu a(int var1) {
      this.a += var1;
      return null;
   }

   protected zagu a(double var1) {
      ++this.a;
      if (var1 != 0.0D) {
         this.f += var1;
         this.b += var1 * var1;
      }

      return null;
   }

   protected zagu a(double var1, int var3) {
      this.a += var3;
      if (var1 != 0.0D) {
         double var4 = var1 * (double)var3;
         this.f += var4;
         this.b += var1 * var4;
      }

      return null;
   }

   public zagu a() {
      double var1 = 0.0D;
      if (this.g) {
         if (this.a <= 0) {
            return zza.a;
         }

         double var3 = this.f / (double)this.a;
         var1 = this.b / (double)this.a - var3 * var3;
      } else {
         if (this.a <= 1) {
            return zza.a;
         }

         var1 = (this.b - this.f / (double)this.a * this.f) / (double)(this.a - 1);
      }

      return new zyy(var1);
   }
}
